﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:SynergyControls">

    <LinearGradientBrush
        x:Key="BarBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="Black"
                      Offset="0"/>
        <GradientStop Color="Gray"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="BarSelectedBrush"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="Red"
                      Offset="0" />
        <GradientStop Color="Orange"
                      Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush
        x:Key="BarStrokeBrush"
        EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="Black" Offset="0"/>
        <GradientStop Color="WhiteSmoke" Offset=" 0.89"/>
    </LinearGradientBrush>
    <Style TargetType="{x:Type local:Bar}">
        <Setter Property="BarStyle">
            <Setter.Value>
                <Style TargetType="{x:Type Shape}">
                    <Setter Property="Fill"
                            Value="{StaticResource BarBrush}" />
                    <Setter Property="Stroke"
                            
                            Value="{StaticResource BarStrokeBrush}"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="BarSelectedStyle">
            <Setter.Value>
                <Style TargetType="{x:Type Rectangle}">
                    <Setter Property="Fill"
                            Value="{StaticResource BarSelectedBrush}" />
                    <Setter Property="Stroke"                            
                            Value="{StaticResource BarStrokeBrush}"/>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:Bar}">
                    
                        <Grid x:Name="LayoutRoot">

                            <Rectangle Height="20" Width="40" x:Name="PART_Bar"/>

                        </Grid>
                   
                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>

</ResourceDictionary>